function binarySearchInsertionSimple<T>(arr: T[], target: T): number {
  let low = 0, high = arr.length - 1;
  while (low <= high) {
    // 防止整数溢出
    const mid = Math.floor(low + (high - low) / 2);
    if (arr[mid] > target) {
      high = mid - 1; 
    } else if (arr[mid] < target) {
      low = mid + 1; 
    } else {
      return mid; // 找到目标元素，返回其索引 
    }
  }
  return low; // 未找到目标元素，返回插入点的索引

}